home *** CD-ROM | disk | FTP | other *** search
- Path: news.dcccd.edu!usenet
- From: bcalbridge@dcccd.edu (Bob Calbridge)
- Newsgroups: comp.lang.c++
- Subject: Scope/longevity of class statics
- Date: 15 Feb 1996 01:04:12 GMT
- Organization: D C C C D
- Message-ID: <4fu0qc$1h0@news.dcccd.edu>
- NNTP-Posting-Host: user.8.127.dcccd.edu
- Mime-Version: 1.0
- X-Newsreader: WinVN 0.99.2
-
- I know this sounds odd but since things didn't seem to work as
- expected I'll put the question to the newsgroup. I have some
- class static data that represents an upper left corner offset
- for all display data. In order to set the value I applied it
- to a temporary class object inside a function. It seemed to
- work find for my purposes. However, when I moved the code that
- set the values to another function that was invoked prior to the
- original function where it was instigated the values ended up
- improperly set by the time I got to my main code.
-
- Does class static data only have scope where the object that
- was used to set it has scope? This doesn't sound right to me
- but it seems as if that's the way it's behaving.
- --
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- - Bob Calbridge = Dallas County Community College District -
- = bcalbridge@dcccd.edu PC Systems Programmer =
- - Postmaster -
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- Patience is a virtue. It's not a job requirement.
-
-